#ifndef __WidgetBarShell_h
#define __WidgetBarShell_h

#include <QObject>
#include <QWidget>
#include <QScrollArea>
#include <QMap>
#include <QBoxLayout>

class WidgetBarShell : public QObject{
    Q_OBJECT
public:
    WidgetBarShell(QObject *parent = nullptr);
    virtual ~WidgetBarShell();

    void shell(QWidget *widget);
    void shell(QBoxLayout *boxLayout);
    void config(int direction);

    QWidget* addWidget(const QString *name);
    void addWidget(const QString *name, QWidget *widget);
    void removeWidget(const QString *name);
    void removeWidget(QWidget *widget);

private:
    QScrollArea *_scrollArea;
    QWidget *_target;
    QMap<QString,QWidget*> _nameToWidget;
};

#endif
